use "/Users/sokolins/Dropbox/Ideas/PortfolioManagersSalariesUpdated/JFQA Replication Package May 2025/Code/rep_data", clear

************************************************
***Baseline REGRESSIONS WITH FIRM-YEAR FE

//All vars
local y "l_salary"

local team_skill " l_skill l_teamskill"  
local team_visibility " l_visibility l_t_visibility" 
local manager_vars "l_revenue l_manager_age l_fund_exp extra_role l_nfunds equity"
local team_vars "l_team_fund_exp l_team_size l_team_manager_age team_equity_share"


//Gen interaction vars
quietly summarize mfm_exp, detail
local med = r(p50)
gen high_fund_exp = mfm_exp >= `med'
gen low_fund_exp = mfm_exp < `med'

gen j_skill = low_fund_exp*l_teamskill
gen h_skill = high_fund_exp*l_teamskill
gen j_vis = low_fund_exp*l_t_visibility
gen h_vis = high_fund_exp*l_t_visibility

************************************************
***Baseline REGRESSIONS WITH FIRM-YEAR FE

//All vars

local manager_vars "l_skill l_visibility l_revenue l_manager_age l_fund_exp extra_role l_nfunds equity"
local team_vars "l_team_fund_exp l_team_size l_team_manager_age team_equity_share"


//TeamSkill
local inter_skill "j_skill h_skill"
local inter_vis "j_vis h_vis"

*Compensation
local y "l_salary"

qui reghdfe `y'  `inter_skill' `manager_vars' `team_vars', absorb(firm#year) cl(firm year)
outreg2 using "results.tex",  dec(3) nocon replace ///
  addtext(Main Effects Included, Yes,Manager Characteristics, Yes, Team Characteristics, Yes,Firm*Year  FE, Yes, Manager FE, Yes) keep ( `inter') 

qui reghdfe `y'  `inter_vis' `manager_vars' `team_vars', absorb(firm#year) cl(firm year)
outreg2 using "results.tex",  dec(3) nocon append ///
  addtext(Main Effects Included, Yes,Manager Characteristics, Yes, Team Characteristics, Yes,Firm*Year  FE, Yes, Manager FE, Yes) keep ( `inter') 
  
  qui reghdfe `y'  `inter_skill' `inter_vis' `manager_vars' `team_vars', absorb(firm#year) cl(firm year)
outreg2 using "results.tex",  dec(3) nocon append ///
  addtext(Main Effects Included, Yes,Manager Characteristics, Yes, Team Characteristics, Yes,Firm*Year  FE, Yes, Manager FE, Yes) keep ( `inter') 

qui reghdfe `y'  `inter_skill' `manager_vars' `team_vars', absorb(firm#year License) cl(firm year)
outreg2 using "results.tex",  dec(3) nocon append ///
  addtext(Main Effects Included, Yes,Manager Characteristics, Yes, Team Characteristics, Yes,Firm*Year  FE, Yes, Manager FE, Yes) keep ( `inter') 

qui reghdfe `y'  `inter_vis' `manager_vars' `team_vars', absorb(firm#year License) cl(firm year)
outreg2 using "results.tex",  dec(3) nocon append ///
  addtext(Main Effects Included, Yes,Manager Characteristics, Yes, Team Characteristics, Yes,Firm*Year  FE, Yes, Manager FE, Yes) keep ( `inter') 
  
  qui reghdfe `y'  `inter_skill' `inter_vis' `manager_vars' `team_vars', absorb(firm#year License) cl(firm year)
outreg2 using "results.tex",  dec(3) nocon append ///
  addtext(Main Effects Included, Yes,Manager Characteristics, Yes, Team Characteristics, Yes,Firm*Year  FE, Yes, Manager FE, Yes) keep ( `inter') 


  
  

seeout using "results.txt"
*********************************************

